package com.grass.appointment.databinding;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.widget.NestedScrollView;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.TextViewBindingAdapter;
import androidx.databinding.adapters.ViewBindingAdapter;
import com.androidx.p013lv.base.view.NoScrollGridView;
import com.grass.appointment.C2693BR;
import com.grass.appointment.C2694R;
import com.grass.appointment.activity.SendDynamicActivity;
import com.grass.appointment.generated.callback.OnClickListener;

public class ActivitySendDynamicLayoutBindingImpl extends ActivitySendDynamicLayoutBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback5;
    private final View.OnClickListener mCallback6;
    private long mDirtyFlags;
    private final LinearLayout mboundView0;
    private final TextView mboundView1;
    private final TextView mboundView2;
    private final TextView mboundView3;
    private final RelativeLayout mboundView4;
    private final ImageView mboundView5;
    private final TextView mboundView7;

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        return false;
    }

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(C2694R.C2697id.toolbar, 8);
        sViewsWithIds.put(C2694R.C2697id.rl_root_view, 9);
        sViewsWithIds.put(C2694R.C2697id.scroll_view, 10);
        sViewsWithIds.put(C2694R.C2697id.tv_edit, 11);
    }

    public ActivitySendDynamicLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 12, sIncludes, sViewsWithIds));
    }

    private ActivitySendDynamicLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 0, (NoScrollGridView) objArr[6], (RelativeLayout) objArr[9], (NestedScrollView) objArr[10], (Toolbar) objArr[8], (EditText) objArr[11]);
        this.mDirtyFlags = -1;
        this.gridView.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.mboundView0 = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.mboundView1 = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[2];
        this.mboundView2 = textView2;
        textView2.setTag(null);
        TextView textView3 = (TextView) objArr[3];
        this.mboundView3 = textView3;
        textView3.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[4];
        this.mboundView4 = relativeLayout;
        relativeLayout.setTag(null);
        ImageView imageView = (ImageView) objArr[5];
        this.mboundView5 = imageView;
        imageView.setTag(null);
        TextView textView4 = (TextView) objArr[7];
        this.mboundView7 = textView4;
        textView4.setTag(null);
        setRootTag(view);
        this.mCallback6 = new OnClickListener(this, 2);
        this.mCallback5 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 32;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (C2693BR.btnStatus == i) {
            setBtnStatus((Integer) obj);
        } else if (C2693BR.editNum == i) {
            setEditNum((Integer) obj);
        } else if (C2693BR.videoCover == i) {
            setVideoCover((Bitmap) obj);
        } else if (C2693BR.type == i) {
            setType((Integer) obj);
        } else if (C2693BR.click != i) {
            return false;
        } else {
            setClick((SendDynamicActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.grass.appointment.databinding.ActivitySendDynamicLayoutBinding
    public void setBtnStatus(Integer num) {
        this.mBtnStatus = num;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(C2693BR.btnStatus);
        super.requestRebind();
    }

    @Override // com.grass.appointment.databinding.ActivitySendDynamicLayoutBinding
    public void setEditNum(Integer num) {
        this.mEditNum = num;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(C2693BR.editNum);
        super.requestRebind();
    }

    @Override // com.grass.appointment.databinding.ActivitySendDynamicLayoutBinding
    public void setVideoCover(Bitmap bitmap) {
        this.mVideoCover = bitmap;
        synchronized (this) {
            this.mDirtyFlags |= 4;
        }
        notifyPropertyChanged(C2693BR.videoCover);
        super.requestRebind();
    }

    @Override // com.grass.appointment.databinding.ActivitySendDynamicLayoutBinding
    public void setType(Integer num) {
        this.mType = num;
        synchronized (this) {
            this.mDirtyFlags |= 8;
        }
        notifyPropertyChanged(C2693BR.type);
        super.requestRebind();
    }

    @Override // com.grass.appointment.databinding.ActivitySendDynamicLayoutBinding
    public void setClick(SendDynamicActivity.OnClick onClick) {
        this.mClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 16;
        }
        notifyPropertyChanged(C2693BR.click);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        boolean z;
        Drawable drawable;
        String str;
        int i;
        long j2;
        long j3;
        int i2;
        TextView textView;
        long j4;
        long j5;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        Integer num = this.mBtnStatus;
        Integer num2 = this.mEditNum;
        Bitmap bitmap = this.mVideoCover;
        Integer num3 = this.mType;
        SendDynamicActivity.OnClick onClick = this.mClick;
        long j6 = j & 33;
        String str2 = null;
        boolean z2 = true;
        int i3 = 0;
        if (j6 != 0) {
            boolean z3 = ViewDataBinding.safeUnbox(num) == 0;
            if (j6 != 0) {
                if (z3) {
                    j5 = j | 128;
                    j4 = 32768;
                } else {
                    j5 = j | 64;
                    j4 = 16384;
                }
                j = j5 | j4;
            }
            z = !z3;
            if (z3) {
                textView = this.mboundView7;
                i2 = C2694R.C2696drawable.base_ic_btn_main_white;
            } else {
                textView = this.mboundView7;
                i2 = C2694R.C2696drawable.base_ic_btn_main;
            }
            drawable = getDrawableFromResource(textView, i2);
        } else {
            drawable = null;
            z = false;
        }
        if ((j & 34) != 0) {
            str = String.valueOf(num2 + "/500");
        } else {
            str = null;
        }
        long j7 = j & 40;
        if (j7 != 0) {
            int safeUnbox = ViewDataBinding.safeUnbox(num3);
            boolean z4 = safeUnbox == 0;
            if (safeUnbox != 1) {
                z2 = false;
            }
            if (j7 != 0) {
                if (z4) {
                    j3 = j | 512;
                    j2 = 8192;
                } else {
                    j3 = j | 256;
                    j2 = 4096;
                }
                j = j3 | j2;
            }
            if ((j & 40) != 0) {
                j |= z2 ? 2048 : 1024;
            }
            str2 = z4 ? "圖片" : "視頻";
            int i4 = z4 ? 0 : 8;
            if (!z2) {
                i3 = 8;
            }
            i = i3;
            i3 = i4;
        } else {
            i = 0;
        }
        if ((j & 40) != 0) {
            this.gridView.setVisibility(i3);
            TextViewBindingAdapter.setText(this.mboundView2, str2);
            this.mboundView4.setVisibility(i);
        }
        if ((32 & j) != 0) {
            this.mboundView1.setOnClickListener(this.mCallback5);
            this.mboundView7.setOnClickListener(this.mCallback6);
        }
        if ((j & 34) != 0) {
            TextViewBindingAdapter.setText(this.mboundView3, str);
        }
        if ((36 & j) != 0) {
            SendDynamicActivity.setVideoCover(this.mboundView5, bitmap);
        }
        if ((j & 33) != 0) {
            ViewBindingAdapter.setBackground(this.mboundView7, drawable);
            this.mboundView7.setEnabled(z);
        }
    }

    @Override // com.grass.appointment.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        if (i == 1) {
            SendDynamicActivity.OnClick onClick = this.mClick;
            if (onClick != null) {
                z = true;
            }
            if (z) {
                onClick.btnBack();
            }
        } else if (i == 2) {
            SendDynamicActivity.OnClick onClick2 = this.mClick;
            if (onClick2 != null) {
                z = true;
            }
            if (z) {
                onClick2.sendUserDynamic();
            }
        }
    }
}
